Skip to content

Fix empty input edge case and correct output formatting#14444

Open
mahema-14 wants to merge 3 commits intoTheAlgorithms:masterfrom
mahema-14:fix-pigeonhole-bug
Open

Fix empty input edge case and correct output formatting#14444
mahema-14 wants to merge 3 commits intoTheAlgorithms:masterfrom
mahema-14:fix-pigeonhole-bug

Conversation

@mahema-14
Copy link

@mahema-14 mahema-14 commented Mar 25, 2026

Description

Fixed an issue where the pigeonhole_sort function would fail for empty input lists by adding a guard clause.

Also corrected output formatting in the main function by converting integers to strings before using join(), preventing runtime errors.

Type of change

  • Fix a bug or typo in an existing algorithm

Checklist

  • I have read the contributing guidelines
  • This PR is my own work
  • This PR changes only one algorithm file

@algorithms-keeper algorithms-keeper bot added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants